package com.example.awtAdapter;

import java.awt.*;
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;

/**
 * @Author 郅占伟
 * @ClassName MyWindowsAdapter
 * @Description TODO
 * @Date 2024年05月10日
 * @Version: 1.0
 */
public class MyWindowsAdapter extends WindowAdapter {
    @Override
    public void windowClosing(WindowEvent e) {
        Window window = (Window) e.getComponent();
        System.out.println("这次是从适配器关闭的窗体");
        window.dispose();
    }
}
